package com.lhkj.ct.framework.auth.service;

import com.lhkj.ct.framework.auth.dto.PatRegisterDto;
import com.lhkj.ct.framework.shiro.token.AccessTokenAuthenticationToken;
import org.springframework.validation.annotation.Validated;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;

/**
 * <p>
 *     登录服务层
 * </p>
 * @author : jobob
 */
@Validated
public interface AuthService {

    /**
     * 获取验证码
     */
    Map<String, Object> getCaptcha(HttpServletRequest request);

    /**
     * 管理员账号密码登录授权
     */
    String webSystemLogin(String data);

    /**
     * 平台用户账号密码登录授权
     */
    String webPlatformLogin(String data);

    /**
     * 公众号登录
     */
    void wechatLogin(String code, HttpServletResponse response) throws IOException;


    String register(PatRegisterDto registerDto);

    String h5SessionId(AccessTokenAuthenticationToken token);

    /**
     * 注销-退出登录
     */
    void webLogout();
}
